<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<%@ include file="/WEB-INF/views/include/constrant.jsp"%>
<html>
<head>
<meta name="decorator" content="front" />
<link href="${ctxStatic }/xiake/css/list.css" rel='stylesheet' type='text/css' />
<script type="text/javascript">
	var suitrtnprice = ${tRentproduct.suitrtnprice};
	$(function(){
		$('#purchasenum').on('change',function(){
			var integer = /^[0-9]*[1-9][0-9]*$/;
			var val = $(this).val();
			if(val!='' && !integer.test(val)) {
				$(this).focus();
				$('#suitrtnprice').text("￥车辆数不正确！");
			} else {
				var totalprice = accMul(val,suitrtnprice);
				$('#suitrtnprice').text("￥"+totalprice.toFixed(2));
			}
		});
		$('#purchasenum').trigger('change');
	});
</script>
</head>
<body>
	<div class="container">
		<input type="hidden" id="menuInfo" value="indexPickSend">
		<form id="bookingForm" action="${ctxFront}/rentproduct/booking" method="get">
			<c:set var="genOrdername" value="${rentgroup.productname}"/>
			<input type="hidden" name="ordername" value="${genOrdername }" />
			<input type="hidden" name="ordertype" value="${query.rentType }" />
			<input type="hidden" name="bookingdays" value="1" />
			<input type="hidden" name="time" value="${query.time }" />
			<input type="hidden" name="realscheid" value="${query.rentid }" />
			<input type="hidden" name="fromdateStr" value="${query.fromdateStr }" />
			<input type="hidden" name="departdateStr" value="<fmt:formatDate value="${query.departdate}" pattern="yyyy-MM-dd HH:mm:ss"/>" />
			<div class="container_date font_large_size">
				<span>${genOrdername }（${tRentproduct.cargotype.typename }）</span>
				<p>
					<span><fmt:formatDate value="${query.fromdate}" pattern="yyyy年MM月dd日"/><fmt:formatDate value="${query.departdate}" pattern="HH:mm"/></span>
				</p>
			</div>
			<div class="container_information font_normal_size">
				<div>
					<label>车辆数</label>
					<input id="purchasenum" type="text" name="purchasenum" value="${not empty orders.purchasenum?orders.purchasenum:'1' }" />
				</div>
				<div>
					<label>${query.tabType == '接机'?'下车地点':'上车地点' }</label>
					<input type="text" name="boardaddr" value="${orders.boardaddr }" />
					<span class="red">*</span>
				</div>
				<%-- <div>
					<label>下车地点</label>
					<input type="text" name="offaddr" value="${orders.offaddr }" />
				</div> --%>
				<div style="height: 80px;margin: 18px 0">
					<label style="vertical-align: top;">行程备注</label>
					<textarea rows="5" placeholder="如有多个目的地，请在此填写其他目的地及相应下车点" name="remarks">${orders.remarks }</textarea>
				</div>
				<div>
					<label>联系人姓名</label>
					<input type="text" name="contacts" value="${orders.contacts }" />
					<span class="red">*</span>
				</div>
				<div>
					<label>联系电话</label>
					<input type="text" name="payertel" value="${not empty orders.payertel?orders.payertel:sessionScope.front_user.mobile}" />
					<span class="red">*</span>
				</div>
			</div>
			<div class="container_submit">
				<div class="container_submit_c font_normal_size">
					一口价：<span class="font_large_size main_color" id="suitrtnprice">￥${tRentproduct.suitrtnprice }</span>
					<div onclick="$('#bookingForm').submit();" class="container_submit_b font_normal_size pointer">提交预定</div>
				</div>
			</div>
		</form>
	</div>
	<div class="notice font_normal_size">
		<c:set var="noticeType" value="${ORDER_TYPE_RENTPRODUCT_AIRPLANE }"/>
		<%@ include file="/WEB-INF/views/include/modules/rentproductNotice.jsp"%>
	</div>
</body>
</html>